package com.wyh.feign.api;

import com.wyh.feign.config.ProductFallbackFactory;
import com.wyh.feign.model.ProductInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "product-service", path = "/product", fallbackFactory = ProductFallbackFactory.class)
public interface ProductAPI {
    @RequestMapping("/{productId}")
    public ProductInfo selectProductById(@PathVariable("productId") Integer productId);
}
